package com.cg.cgms.service.impl;

import com.cg.cgms.mapper.FoodMapper;
import com.cg.cgms.pojo.Food;
import com.cg.cgms.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class FoodServiceImpl implements FoodService {
    @Autowired
    private FoodMapper foodMapper;
    @Override
    public ArrayList<Food> foodBySsid(Integer ssid) {
        ArrayList<Food> foods=foodMapper.findBYSsid(ssid);
        return foods;
    }

    @Override
    public ArrayList<Food> foodByName(String name) {
        ArrayList<Food> foods=foodMapper.findByName(name);
        return foods;
    }

    @Override
    public ArrayList<Food> findByMoney(float minMoney, float maxMoney) {
        ArrayList<Food> foods=foodMapper.findByMoney(minMoney,maxMoney);
        return foods;
    }
}
